package com.rest.demo.functional.strean;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Collectors;

/**
 * @author Administrator
 * @decription
 * @Date 2018-01-29 10:56
 */
public class StreamDemo {
    public static void main(String[] args) throws IOException {
        String content = Files.readAllLines(Paths.get("F:\\a.txt")).stream()
                .collect(Collectors.joining("\n"));
        System.out.println(content);
    }
}
